<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body id="demo">
    <my-directive class="hello" name="hi"></my-directive>
    <script type="text/javascript" src="js/vue.1.0.28.js"></script>
    <script>
    Vue.elementDirective('my-directive',{
        bind:function(){
            console.log(this.el.className);
            console.log(this.el.getAttribute("name"));
        }
    });
    var demo=new Vue({el:'#demo'})
    </script>
</body>

</html>